using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Simple.Contracts.Models
{
    /// <summary>
    /// 照护任务Dto
    /// </summary>
    public class CareMissionDto
    {
        /// <summary>
        /// 主键Id
        /// </summary>
        public int Id { get; set; }

        /// <summary>
        /// 公司Id
        /// </summary>
        public long CompanyId { get; set; }

        /// <summary>
        /// 照护项目分类Id
        /// </summary>
        public long CategorizeId { get; set; }

        /// <summary>
        /// 照护项目名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 照护项目描述、注意事项
        /// </summary>
        public string Description { get; set; }

        /// <summary>
        /// 是否每日照护任务：0=否、1=是
        /// </summary>
        public int IsDailyMission { get; set; } = 1;

        /// <summary>
        /// 每日照护任务：建议开始时间（HH:mm）
        /// </summary>
        public string DailyMissionStartTime { get; set; }

        /// <summary>
        /// 每日照护任务：建议结束时间（HH:mm）
        /// </summary>
        public string DailyMissionEndTime { get; set; }

        /// <summary>
        /// 每日照护任务：建议开始时间（HHmm）
        /// </summary>
        public int? DailyMissionStartTimeValue { get; set; }

        /// <summary>
        /// 每日照护任务：建议结束时间（HHmm）
        /// </summary>
        public int? DailyMissionEndTimeValue { get; set; }

        /// <summary>
        /// 每日照护任务：建议执行次数
        /// </summary>
        public int? DailyMissionExecutionCount { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 创建人
        /// </summary>
        public long CreateBy { get; set; }

        /// <summary>
        /// 更新时间
        /// </summary>
        public DateTime UpdateTime { get; set; }

        /// <summary>
        /// 更新人
        /// </summary>
        public long UpdateBy { get; set; }

        /// <summary>
        /// 排序
        /// </summary>
        public int Sort { get; set; }
    }

    /// <summary>
    /// 照护任务保存输入
    /// </summary>
    public class CareMissionSaveInput
    {
        /// <summary>
        /// 主键Id（新增时为空，编辑时有值）
        /// </summary>
        public int? Id { get; set; }

        /// <summary>
        /// 照护项目分类Id
        /// </summary>
        public long CategorizeId { get; set; }

        /// <summary>
        /// 照护项目名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 照护项目描述、注意事项
        /// </summary>
        public string? Description { get; set; }

        /// <summary>
        /// 是否每日照护任务：0=否、1=是
        /// </summary>
        public int IsDailyMission { get; set; } = 1;

        /// <summary>
        /// 每日照护任务：建议开始时间（HH:mm）
        /// </summary>
        public string? DailyMissionStartTime { get; set; }

        /// <summary>
        /// 每日照护任务：建议结束时间（HH:mm）
        /// </summary>
        public string? DailyMissionEndTime { get; set; }

        /// <summary>
        /// 每日照护任务：建议执行次数
        /// </summary>
        public int? DailyMissionExecutionCount { get; set; }

        /// <summary>
        /// 排序
        /// </summary>
        public int Sort { get; set; }
    }

    /// <summary>
    /// 照护任务分类Dto
    /// </summary>
    public class CareMissionCategorizeDto
    {
        /// <summary>
        /// 任务类别Id
        /// </summary>
        public long Id { get; set; }

        /// <summary>
        /// 任务类别名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 公司Id
        /// </summary>
        public long CompanyId { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 创建人
        /// </summary>
        public long CreateBy { get; set; }

        /// <summary>
        /// 更新时间
        /// </summary>
        public DateTime UpdateTime { get; set; }

        /// <summary>
        /// 更新人
        /// </summary>
        public long UpdateBy { get; set; }

        /// <summary>
        /// 排序
        /// </summary>
        public int Sort { get; set; }

        /// <summary>
        /// 照护任务列表
        /// </summary>
        public List<CareMissionDto> CareMissions { get; set; }
    }

    /// <summary>
    /// 照护任务分类保存输入
    /// </summary>
    public class CareMissionCategorizeSaveInput
    {
        /// <summary>
        /// 任务类别Id（新增时为空，编辑时有值）
        /// </summary>
        public long? Id { get; set; }

        /// <summary>
        /// 任务类别名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 排序
        /// </summary>
        public int Sort { get; set; }
    }

    /// <summary>
    /// 照护任务分类列表输入
    /// </summary>
    public class CareMissionCategorizeListInput
    {
        /// <summary>
        /// 是否返回分类下的照护任务列表
        /// </summary>
        public bool IncludeMissions { get; set; }

        /// <summary>
        /// 是否查看平台:NULL=(平台&公司) False=(公司)True=(平台)
        /// </summary>
        public bool? SelectPlatform { get; set; }

        /// <summary>
        /// 任务名称
        /// </summary>
        public string? Name {  get; set; }

        /// <summary>
        /// 任务时间：每日不限实时时段、根据需求及老人情况、00:00-06:00
        /// </summary>
        public string? Time {  get; set; }
    }

    /// <summary>
    /// 照护任务分类排序更新输入
    /// </summary>
    public class CareMissionCategorizeSortInput
    {
        /// <summary>
        /// 分类Id
        /// </summary>
        public long Id { get; set; }

        /// <summary>
        /// 排序值
        /// </summary>
        public int Sort { get; set; }
    }
}